from django.db import models

# Create your models here.

class redisInfo(models.Model):
    '''
    redis信息
    '''

    name = models.CharField(max_length=20,null=True,blank=True,verbose_name="名称",help_text="名称")
    env = models.CharField(max_length=20,null=False,blank=False,verbose_name="环境",help_text="环境")
    port = models.IntegerField(null=False,blank=False,verbose_name="端口",help_text="端口")
    password = models.CharField(max_length=100,null=True,blank=True,verbose_name="密码",help_text="密码")
    address = models.CharField(max_length=100,null=False,blank=False,verbose_name="地址",help_text="地址")
    create_time = models.DateTimeField(editable=False,auto_now_add=True,null=True,blank=True,verbose_name="创建日期",help_text="创建日期")

    class Meta:
        verbose_name = "缓存信息"
        verbose_name_plural = verbose_name
        db_table = "redis_info"

    def __str__(self):
        return self.name